package com.vogue.supplymall.account.shiro.token;

import org.apache.shiro.authc.UsernamePasswordToken;

import com.vogue.supplymall.account.shiro.realm.SwitchingIdentityRealm;
/**
 * 切换身份登录的封装Token<br>
 * 
 * @author 崔岳
 *
 */
public class SwitchingIdentityToken extends UsernamePasswordToken{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8124625577907506535L;

	public SwitchingIdentityToken(final String username) {
		super(username, username);
	}
	
	@Override
	public Object getPrincipal() {
		// TODO Auto-generated method stub		
		return SwitchingIdentityRealm.getCacheKey(this.getUsername());
	}
}
